FHEM: Battery powered Home Automation remote display using small OLED and MQTT
This is the successor of my MQTT remote display. It is battery driven and can so be placed where you want.
The main component is a Pololu U1V11F3, a step up/down converter with 3V3 output and an Enable input pin. Unfortunately the Enable pin is already clamped to Vin via a 100K resistor. For me I had to remove the small SMD resistor to have the circuit powered off normally. The R6/100K is located directly to the Enable in Input connectors of the Pololu board.
The Enable pin is then connected to GND via an 1M resistor to ground. Do not leave the Enable pin floating, it will sense a finger tip already and switch to on/off by accident.
Then I added a momentary switch and a 47K resistor between Vin (the battery Plus) and the Enable pin. If the switch is pressed, the converter starts and gives 3V3 on it’s Output pin. This powers the ESP12 and the OLED display. But only as long as you press the switch. So I added a Diode from GPIO14 of the ESP-12 to the Enable pin.
In the code, GPIO14 is set as output and immediately set to high. This will enable the converter even when the switch is released.
After some code cycles, the GPIO14 output is set to low and the power of the converter is shut down.
The converter will not drain the battery in shutdown mode. But you need to press and hold the switch 2 or 3 seconds until the code powers the Enable pin.